package karileet.meeting.profile.model;
/**
 * Class for one row element. Toggleable
 * @author markus
 *
 */
public class RowModel {

	private String title;
	private String altTitle;
	private String description;
	private String altDescription;
	private boolean selected;

	public RowModel(String title, String description, String altTitle, String altDescription, boolean selected) {
		this.title = title;
		this.description = description;
		this.altTitle = altTitle;
		this.altDescription = altDescription;
		
		this.selected = selected;
	}

	public String getTitle() {
		if (selected) {
			return altTitle;
		}
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getDescription() {
		if (selected) {
			return altDescription;
		}
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public boolean isSelected() {
		return selected;
	}

	public void setSelected(boolean selected) {
		this.selected = selected;
	}
	
	public void toggle() {
		this.selected = !this.selected;
	}

}
